package DTO;

import BLL.BCart;
import BLL.BFavorite;
import java.util.ArrayList;

public class User {
	
	 	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getNumberPhone() {
		return numberPhone;
	}
	public void setNumberPhone(String numberPhone) {
		this.numberPhone = numberPhone;
	}
	public ArrayList<Cart> getCarts() {
            if(carts == null)
            {
                carts = new BCart().getByUserId(userId);
            }
		return carts;
	}
	
	public ArrayList<Comment> getComments() {
		return comments;
	}
	
	public ArrayList<Favorite> getFavorites() {
            if(favorites == null)
            {
                favorites = new BFavorite().getByUserId(userId);
            }
		return favorites;
	}
	
		private int userId ;
	    private String username;
	    private String password;
	    private String email ;
	    private String address;
	    private String numberPhone;
	    private ArrayList<Cart> carts;
	    private ArrayList<Comment> comments ;
	    private ArrayList<Favorite> favorites;
	    

}
